package com.fuchuang.seckillsystem.mapper;

import com.fuchuang.seckillsystem.dto.OrderInfo;
import com.fuchuang.seckillsystem.dto.OrderQuery;
import com.fuchuang.seckillsystem.entity.Order;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface OrderMapper {
    
    int insertSelective(Order order);
    
    Order selectByPrimaryKey(@Param("id") Integer id);
    
    int updateByPrimaryKeySelective(Order order);
    
    /**
     * 用户所有的订单
     */
    List<OrderInfo> queryUserOrderInfo(OrderQuery orderQuery);
    
    /**
     * 通过订单id查询订单信息
     *
     * @param orderId 订单id
     */
    OrderInfo queryOrderInfoByOrderId(@Param("orderId") Integer orderId);
    
    
    List<OrderInfo> queryAllOrderInfo(OrderQuery orderQuery);
}